import numpy as np
import cv2 as cv
import matplotlib.pyplot as plt
kids=cv.imread("../imgs/kids.jpg")
#图像旋转案例
rows,cols=kids.shape[:2]
#1.获取旋转矩阵:(旋转中心、旋转角度、缩放比例)
M=cv.getRotationMatrix2D((cols/2,rows/2),180,1)
#2.调用warpAffine()实现旋转
dst=cv.warpAffine(kids,M,(cols,rows))

plt.imshow(dst[:,:,::-1])
plt.show()